package com.example.mvvmdemo.base.paging;

import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.recyclerview.widget.RecyclerView;


/**
 * created by tl
 * created at 2020/9/2
 */
public class BaseViewHolder<T extends ViewDataBinding> extends RecyclerView.ViewHolder {

    public T binding;

    public BaseViewHolder(@NonNull ViewGroup parent, int layoutID) {
        super(LayoutInflater.from(parent.getContext())
                .inflate(layoutID, parent, false));
        binding = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), layoutID, parent, false);
    }
}
